package com.lelv.business.webInfo.action;

import java.util.ArrayList;
import java.util.List;

import com.lelv.business.route.bo.IRouteBo;
import com.lelv.business.route.model.Route;
import com.lelv.business.travelAgency.bo.ITravelAgencyBo;
import com.lelv.business.travelAgency.model.TravelAgency;
import com.lelv.business.travelInfo.bo.ITravelArticelBo;
import com.lelv.business.travelInfo.model.TravelArticle;
import com.lelv.business.user.bo.IUserCommentBo;
import com.lelv.business.user.model.UserComment;
import com.lelv.framework.action.BaseAction;
import com.lelv.framework.plugin.Page;

public class IndexAction extends BaseAction{

	private IRouteBo routeBo;
	private ITravelArticelBo travelArticleBo;
	private IUserCommentBo userCommentBo;
	private ITravelAgencyBo travelAgencyBo;
	private List<Route> routeList = new ArrayList<Route>();
	private List<TravelArticle> travleArticleList = new ArrayList<TravelArticle>();
	private List<TravelAgency> travelAgencyList = new ArrayList<TravelAgency>();
	private List<UserComment> comments = new ArrayList<UserComment>();
	private Page page = new Page();

	public String index(){

		this.routeList = this.routeBo.getRoutes(page).getList();
		this.travleArticleList = this.travelArticleBo.getTravelArticleList(page).getList();
		this.travelAgencyList = this.travelAgencyBo.getTravelAgencyPage(page).getList();
		this.comments = this.userCommentBo.getUserComments(page).getList();

		return "indexOK";
	}

	public IRouteBo getRouteBo() {
		return routeBo;
	}
	public void setRouteBo(IRouteBo routeBo) {
		this.routeBo = routeBo;
	}
	public ITravelArticelBo getTravelArticleBo() {
		return travelArticleBo;
	}
	public void setTravelArticleBo(ITravelArticelBo travelArticleBo) {
		this.travelArticleBo = travelArticleBo;
	}
	public List<Route> getRouteList() {
		return routeList;
	}
	public void setRouteList(List<Route> routeList) {
		this.routeList = routeList;
	}
	public List<TravelArticle> getTravleArticleList() {
		return travleArticleList;
	}
	public void setTravleArticleList(List<TravelArticle> travleArticleList) {
		this.travleArticleList = travleArticleList;
	}
	public Page getPage() {
		return page;
	}
	public void setPage(Page page) {
		this.page = page;
	}

	public List<UserComment> getComments() {
		return comments;
	}

	public void setComments(List<UserComment> comments) {
		this.comments = comments;
	}

	public IUserCommentBo getUserCommentBo() {
		return userCommentBo;
	}

	public void setUserCommentBo(IUserCommentBo userCommentBo) {
		this.userCommentBo = userCommentBo;
	}

	public ITravelAgencyBo getTravelAgencyBo() {
		return travelAgencyBo;
	}

	public void setTravelAgencyBo(ITravelAgencyBo travelAgencyBo) {
		this.travelAgencyBo = travelAgencyBo;
	}

	public List<TravelAgency> getTravelAgencyList() {
		return travelAgencyList;
	}

	public void setTravelAgencyList(List<TravelAgency> travelAgencyList) {
		this.travelAgencyList = travelAgencyList;
	}
}
